home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
manual-p
/
vh-man2h.000
/
vh-man2h
/
vh-man2html-1.3
/
Makefile
next >
Wrap
Makefile
|
1996-05-04
|
2KB
|
80 lines
#
# man2html
#
# Simple makefile (michael@actrix.gen.nz).
#
# Set these to your desires...
#
# The name of the cwd must be PACKAGENAME in order to build an rpm
#
RPM_PROG = rpm-1.4
PACKAGENAME = vh-man2html-1.3
TARFILE = $(PACKAGENAME).tar.gz
SPECFILE = $(PACKAGENAME).spec
SPECLOC = /usr/src/SPECS
SOURCELOC = /usr/src/SOURCES
#
# CGIBASE is defined relative to the current server.
# If CGIBASE starts with a relative "http:..." address (ie not "http://.."),
# man2html will insert the httpd's server name (as reported by the
# SERVER_NAME environment variable) into server any redirects it generates
# ie a redirect of location: http:/cgi-bin/...
# will be returned as location: http://server_name/cgi-bin/...
# This is so that remote browsers will receive the necessary server
# address on redirects.
#
CGIBASE = http:/cgi-bin/man2html
#
HTMLDIR = /home/httpd/html
TOPLEVELDOC = $(HTMLDIR)/man.html
#
BINDIR = /usr/bin
CGIDIR = /home/httpd/cgi-bin
MANDIR1 = /usr/man/man1
MANDIR8 = /usr/man/man8
OWNER = root.root
#
# -fno-strength-reduce is in case this gcc has a bug.
CFLAGS = -O2 -fno-strength-reduce -DTOPLEVELDOC='"$(TOPLEVELDOC)"' -DCGIBASE='"$(CGIBASE)"'
INSTALL = install
#
#
INCLUDES =
PROGS = man2html manwhatis mansec mansearch
targets: $(PROGS)
man2html: man2html.c
$(CC) $(CFLAGS) $< -o $@
install: targets
for i in $(PROGS); do \
$(INSTALL) $$i $(CGIDIR) ; \
chown $(OWNER) $(CGIDIR)/$$i ; \
done ; \
$(INSTALL) man.html $(TOPLEVELDOC) ; \
$(INSTALL) mansearch.html $(HTMLDIR) ; \
$(INSTALL) mansearchhelp.html $(HTMLDIR) ; \
$(INSTALL) netscape-man $(BINDIR) ; \
$(INSTALL) man2html.8 $(MANDIR8) ; \
$(INSTALL) netscape-man.1 $(MANDIR1) ; \
if [ \! -d /var/man2html ] ; then \
mkdir /var/man2html ; chmod o=rwxt /var/man2html; \
fi
rpm: spotless
(cd ..; tar cvzf $(SOURCELOC)/$(TARFILE) $(PACKAGENAME) ) ; \
cp $(SPECFILE) $(SPECLOC)/$(SPECFILE)
$(RPM_PROG) -ba -v $(SPECFILE)
clean:
-rm *.o *~
spotless: clean
-rm man2html